home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 September
/
Macworld (1997-09).dmg
/
Shareware World
/
Utilities
/
Text Processing
/
AlphaLite.6.52
/
Help
/
HTML Help
< prev
next >
Wrap
Text File
|
1997-04-01
|
93KB
|
2,193 lines
HTML mode version 1.4.1
Copyright by Johan Linde
April 1997
Use the marks menu [M] ------------------------------------------------- >>
to quickly jump to different sections of this file.
There is also an HTML formatted version of this manual, with lots of screen
shots. You can find it in the folder HTML mode manual. (Not included in
AlphaLite.)
HTML Mode is for editing HyperText Markup Language documents (suffix
".html", ".htm" or ".shtml"). Whenever you open or save a file with any of
these suffixes, Alpha switches to HTML mode and inserts the HTML mode menu
in the menu bar. You can also manually switch to HTML mode with the popup
mode menu in the status bar.
HTML mode does not teach you HTML. Therefore you have to know at least
some HTML to use it. If you do not know about HTML, I recommend that you
read "A Beginner's Guide to HTML". It is a good first text to read.
You can find it at
http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html
I have collected some other links to HTML guides. See the section on
HTML Tutorials and references.
The basic idea with this HTML environment is to save you time while typing,
by having key bindings for all HTML elements. Also, you do not have to
worry about misspelt HTML tags, missing end quotes, or missing end tags.
HTML mode is probably most useful for HTML programmers with some experience
of HTML, who are looking for an editor that makes the editing easier and
faster.
When you use this package, by default you will see bullet characters (•),
called "tab marks", being dribbled near where you insert elements. These
are supposed to be a feature. The tab key takes you to the next one and
automatically deletes the bullet. Read the section "How to use tab marks"
to learn to use them in the best way.
===============================================================================
= HTML mode features
===============================================================================
• HTML mode knows HTML 3.2 and Netscape's extensions to HTML.
• Tools to easily and quickly insert HTML elements and give them
attributes. Each element has its own key binding.
• Tools to easily change or remove HTML elements.
• Tools for building lists and tables.
• You can define colors with a color picker to use on your web pages.
• You can check that all links between your files are OK.
• You can move files between folders and automatically update all links
between and in them.
• Support for dynamically included files.
• Conversion of NCSA and CERN image map files to client side image maps.
• Support for editing of JavaScript.
• Translation of special characters, å, ó, ü etc. to
and from their HTML entities.
• Files are sent to your browser with one key stroke.
• Any menu item can be bound to any single key stroke.
• You can define new HTML elements. Therefore you don't have to wait for
Alpha to be updated to use it for new HTML.
• etc. etc.
Acknowledgment
First of all, I would like to thank Pete Keleher for writing Alpha, the
best editor in the world, without which my TCL code would be pretty
useless. I am also indebted to Scott Brim who wrote an earlier version of
Alpha's HTML mode. Some ideas and tcl code were taken from html.el for GNU
Emacs and latex.tcl for Alpha. François Pottier gave me lots of help with
the code which makes Alpha talk to Big Brother. The algorithm for
extracting the width and height of JPEG images were written by Alex Knowles
and Andrew Tong. Many thanks to Michael O'Henly for making the wonderful
Alpha HTML mode intro site. He has also who sent me a list with
corrections of the language in this manual. (Don't blame him for the
remaining errors!) And thanks to everybody who has sent me suggestions and
bug reports. You know who you are.
I want feedback! All comments on HTML mode are welcome. Many features in
HTML mode were suggested by HTML mode users. Don't hesitate to send me
your ideas. In particular, please tell me
• about bugs of any kind,
• about new feature you want to have included in the HTML mode,
• if you think some function behaves stupidly,
• if some HTML element is not defined correctly,
• if something is not explained well enough in this help file.
You may also tell me that you like HTML mode. :-)
I have a page http://bach.theophys.kth.se/~jl/Alpha.html where you can
download new versions of HTML mode before they are included in the general
Alpha distribution.
If you want to be notified about new releases, including beta releases,
send me a mail and I'll put you on my mailing list.
Johan Linde <jl@theophys.kth.se>
HTML mode is free. This means that it may be used freely, and distributed
freely, as long as the receiver is not obligated in any way by receiving it.
HTML mode consists of the files html.tcl, htmlCustom.tcl, htmlElems.tcl,
htmlEngine.tcl, htmlExtra.tcl, htmlMenu.tcl, htmlMode.tcl, htmlUtils.tcl,
this help file and the HTML formatted manual in the folder HTMLmanual.
However, Alpha itself is not free. It's shareware.
Writing HTML mode has taken a considerable amount of time. Therefore, if
you like HTML mode and use it a lot, I would very much appreciate if you
send me a colorful postcard and tell me that. It would give me new energy
to add new features to HTML mode. Note that emails don't count as
postcards. Emails are not pretty enough to put on the wall. My address is
Johan Linde
Lojovägen 61
S-181 47 LIDINGÖ
SWEDEN
===============================================================================
= Language
===============================================================================
My mother tongue is Swedish. Therefore you will, no doubt, find
grammatical and other errors in this document and in HTML mode. Please
tell me about any such error you find -- in a menu, dialog box, error
message...
But before you complain, I must tell you that I know that "color" is spelt
"colour". :-)
===============================================================================
= Version history
===============================================================================
Version 1.4.1, 2 April 1997
• A few changes to the HTML 3.2 package to make it agree with the final
recommendation from W3C 14 January 1997.
• Alpha can now optionally save a window without asking when you send it
to your browser.
• If you have more than one version of the same browser and one is running,
Alpha no longer tries to launch the second one when you send a file to
the first one.
• You can now set the line width of your HTML documents (fillColumn
variable).
• A couple of bug fixes. In particular a bug which in a few cases would
extract the wrong width and height of gifs and jpegs has been fixed.
Version 1.4, 21 January 1997
• Files outside home page folders are considered to have URLs like
file:///path/to/file.html. This implies that you can now check links
between all files, not only the ones in your home page folders. Similarly
you can make links via a file dialog between all files, and
cmd-double-click now works for all files.
• Improved integration with Big Brother. (You need Big Brother 1.1 or
later.)
• Each home page folder can have a corresponding include folder, where you
can put all your files to be dynamically included. This include folder is
mapped to the same URL as the home page folder.
• 'Move files' works for files in these new include folders.
• 'Update folder' and 'update file' for include files.
• Case-sensitive link checking.
• You can now choose if you want to check anchors when you check links.
• Unsafe characters in URLs are coded when they are inserted, e.g. space
becomes %20.
• Long opening tags are wrapped when they are inserted.
• Cmd-double-click on an include tag opens file.
• Home page URLs no longer have to be specified in two pieces.
• 'Check links' didn't work for anchors with spaces. Fixed.
• 'Check folder' can now optionally check subfolders.
• 'Convert NCSA map' couldn't correctly translate circle areas. Fixed.
• When image maps are converted, the default URL is now put last.
• color_9 ... color_15 can be used as keyword color.
• The predefined colors are replaced by the 16 ones defined in HTML 3.2.
• HTML manual can be opened from the menu.
• Added onReset to FORM.
• Added HEIGHT to TABLE.
• SHAPE=DEFAULT removed from HTML 3.2 package.
• ALT is now correctly a required attribute of AREA.
• A couple of other minor changes and bug fixes.
Version 1.3, 17 November 1996
• New submenu 'Browsers' where you can add all your browsers, and quickly
choose which one to send files to. ('Choose browser' is gone, and as a
concequence changed the key binding for SCRIPT back again.)
• 'Check links' now checks anchors.
• Fixed a bug in 'Check links' for links like HREF="#anchor" in files
containing a <BASE HREF="url">.
• Improved error handling in 'Move files' and 'Update home page'.
• Fixed a bug with include tags split into two lines.
• 'Includes' now works for paths containing the characters "<>.
• Similar fix for 'last modified date'.
• A few other minor changes and fixes.
Version 1.3b2, 4 November 1996
• The HTML prefs file (if any) sometimes wasn't loaded in 1.3b1. Fixed.
• Modified 'Table template'.
• New 'Tabs to Rows' dialog.
• Function to import a table from a file.
• 'Make list' can now optionally insert list tags.
• Untitled windows could not be sent to browser. Fixed.
• Updating dynamically included files now changes last modified date.
• Importing an exported URL cache missed first URL. Fixed.
• You can now go back in 'Clean up cache' dialog.
• BASEFONT added to HTML 3.2 package. (Included in the latest draft from
W3C.)
• Described in this help file how to easily bind any menu item to any single
keystroke.
Version 1.3b1, 22 October 1996
• You can now define more than one home page folder, each containing files
of different sites.
• Support for dynamically included files.
• Conversion of NCSA and CERN image map files to client side image maps.
• New interface for defining colors. You can now also define a color by
specifying its hexadecimal number.
• New interface for footers.
• When selecting a GIF or JPEG file for <IMG> via a file dialog its width
and height are automatically determined. The algorithm for JPEG is taken
from the perl script 'wwwimagesize' by Alex Knowles, alex@ed.ac.uk,
and Andrew Tong, werdna@ugcs.caltech.edu.
• The URL cache can be exported to a file for later use.
• You can scan any file for URLs and import them to the URL cache.
• The names of the files in a folder can be imported to the URL cache.
• 'Last modified date' can automatically be inserted when you save a file.
• Link checking can be done with Big Brother by François Pottier.
• Function to change choices directly in the document.
• Translation of <>&.
• A user friendly settings dialog.
• Cmd-double-click on a color attribute brings up a color picker and let
you change the color.
• Ctrl-q to skip the rest of the attributes in status bar.
• Required attributes are asked for again in status bar.
• Links checks can be done in the current window.
• 'Comment' and 'Comment line' insert HTML comment or JavaScript comment
depending on the position.
• Funcs menu lists headers H1-6.
• Function to select the content of a container.
• Shift-ctrl-opt-space bound to
• Table template optionally without TABLE tags.
• Comment color in JavaScript coloring can be changed.
• 'Reveal color' has moved to new 'Editing' sub menu, and has got a new key
binding.
• Added ARCHIVE and MAYSCRIPT to APPLET.
• Some other minor changes.
Version 1.2.2, 3 October 1996
• You can now change browser for preview (option on 'send file to browser').
As a consequence, the key binding for SCRIPT is changed.
• 'Check links', 'Move files' and cmd-double-click now correctly interpret
links like HREF="#anchor" as pointing to the file itself and not to
"index.html#anchor".
• The same functions now ignores "news:" links like they always have ignored
"mailto:" links.
Version 1.2.1, 12 September 1996
• 'Move files' no longer remove blank lines in the moved files.
• Special window names _self _top _parent _blank correctly set to lowercase.
• 'Mark file' didn't find header when opening tag was split into two
lines. Fixed.
• HTTP-EQUIV is no longer a required attribute of META.
• Value of NAME attribute to A, MAP and FRAME wasn't added to cache when
tags were set in lowercase. Fixed.
Version 1.2, 3 August 1996
• The package HTML 2.0 is removed, since it is out-dated. From now on
there will only be two packages, one with the latest official HTML and
one where extensions have been included.
• There is now only two way to input attributes, the dialogs introduced
in 1.1 and the status bar.
• Improved behavior when attributes are given in the status bar. ctrl-z to
cancel, ctrl-f for a file dialog or new color. When a value is chosen
from a popup window, Alpha immediately jumps to the next attribute.
• A new user friendly way to add new HTML elements.
• A function to move files between folders and automatically update all
links to and in them.
• Changed JavaScript coloring. Only reserved words are colored, not built
in methods and properties. Comments in JavaScript are now colored.
• A window cache just like the URL cache. Frame names are automatically added
to this cache.
• A new submenu with plug-ins.
• JavaScript's event handlers can now optionally appear in the attribute dialog.
• Only one menu item for <A>.
• Added SRC to <SCRIPT>.
• Added <NOSCRIPT>, <MULTICOL> and <SPACER>.
• Added FRAMEBORDER, BORDERCOLOR to <FRAME>.
• Added FRAMEBORDER, BORDERCOLOR, BORDER to <FRAMESET>.
• Added FACE to <FONT>.
• Added onMouseOut to <A>.
• Added onAbort, onError, onLoad to <IMG>.
• Added onClick, onMouseOver, onMouseOut to <AREA>.
• When trying to add a link via a file dialog, windows with ' <n>' added to
the window name were asked to be saved even if they already were saved.
Fixed!
• Send file to browser didn't work for windows with ' <n>' appended. Fixed!
• Problems finding the browser fixed.
• Reveal color didn't find color attribute if color wasn't quoted. Fixed!
• Check links didn't find BASE if it was split into two lines. Fixed!
• Check links and cmd-double-click now correctly interpret paths of the form
"./file.html".
• Check links and cmd-double-click now search for a file index.html when a
link points to a folder.
• Check links didn't work for files with UNIX or IBM newlines. (All links
were found to be ok.) Fixed!
• Some lists couldn't be inserted when using the status bar. Fixed!
• 'Change opening' didn't work for INPUT elements in lower case. Fixed!
• The variable htmlElemAttrsForAll is no longer supported.
• Some other minor changes and bug fixes.
Version 1.1.1, 17 June 1996
• Rewrote some of the code so that HTML mode loads faster.
• The menu Use Attributes is disabled when it is not needed.
• Added <U> and <NOEMBED>.
• The new suffix mapping is used to determine if a file is a HTML file
when deciding which files to scan to check the links.
Version 1.1, 21 May 1996
• The HTML elements are put into three packages, HTML 2.0, HTML 3.2 and
Extensions.
• Support for JavaScript coloring and editing.
• A function to check that all links between files in your home page are ok.
• Attributes to an element can be input in one single dialog box,
rather that giving the attributes one after another.
• When you are asked about an URL attribute, you can choose a file via a
file dialog. The relative path is automatically inserted.
• "Fill paragraph" is now sensitive to HTML elements.
• cmd-doubleclick on a relative URL opens the file, or if it does not
exits, it can create a new file and save it in the right place.
• You can define a new color when you are asked about a color attribute.
• You can define files with footers, which can be automatically inserted
when you create a new document.
• Control that a value given to a number attribute is valid.
• Control that a value given to a color attribute is valid.
• New dialog box for "New document" where you can choose which elements
you want in the head, and also select a file with a footer to insert in the
end of the body.
• Character translation can be done in a selection. The translation is also
a lot faster.
• Tab marks can be removed in a selection.
• "Select container" and "Untag" now find the correct pair of tags when
there are elements of the same kind within each other, like a <TABLE> within
a <TABLE>.
• "Select container" and "Untag" now ignores all tags without a closing tag.
• A function to select a tag with no closing tag.
• A function to untag a element with no closing tag.
• A function to untag a container and automatically select the content.
• A function to change an element in the document.
• New key binding for untag: ctrl-F1. It has been bundled with the new functions
just mentioned.
• Mark file now finds headers with opening and closing tags on different
lines. Each menu item is limited to 30 characters, not to make them too long.
• If you use any of the two old ways of inputting attributes, you can
set a flag for each element, so that you can optionally be asked about the
attributes not chosen in the "Use attributes" menu.
• A table template function, to quickly make tables.
• With "Tabs to rows" you can now optionally put table headers in first
row and/or column.
• "Rows to tabs" now follow the HTML code, not the line breaks in the file.
• A function to insert <BR> at the end of every line in a selection.
• A function to remove every <BR> in a selection.
• A function to insert <P> at empty lines in a selection.
• A function to make a HTML list from a *'d list.
• Undo is now easier, although you sometimes still have to make two "Undos"
to undo something.
• For attributes which can take any value, beginning and ending spaces are
no longer removed. Sometimes these spaces are wanted.
• When <A NAME="xxx"> or <MAP NAME="xxx"> is inserted, "#xxx" is added to
URL cache.
• New dialog box for cleaning up URL cache.
• Two identical colors can no longer be defined.
• New elements STRIKE and DFN.
• New element <INPUT TYPE=BUTTON> in extensions package. To be used
together with JavaScript.
• A couple of new attributes added so some elements.
• For the AREA element, a check is made that you use one of the attributes
HREF and NOHREF is used, but not both.
• The key binding for "Comment line" have been changed to ctrl-C-L to
conform with other modes.
Version 1.0, 25 March 1996
• A lot of new elements are included.
• It's possible to define colors to use as background color, text color etc.
from a color picker.
• Translation of accented letters (é, á etc.) to HTML entities and vice versa.
• The attributes of the elements are divided into required and optional ones.
If you skip a required one, no element is inserted. You can no longer make
elements like <A></A>.
• For some elements there is a separate key binding as well as menu item to
automatically skip all attributes.
• Improved behavior when the status bar is used to input attributes.
• Untagging works better.
• Marking of the file works better.
• Plus a number of other small changes.
===============================================================================
= Known bugs / limitations
===============================================================================
The first three are general Alpha bugs beyond my control and may have been
fixed by the time you read this.
• Switching coloring of JavaScript keywords on or off has no effect until
you switch to another window.
• Disabled menu items can be accessed from a palette.
• Sometimes when you undo, Alpha doesn't redraw the text correctly. (Ctrl-L
to redraw the window.)
• Sometimes you have to undo twice to undo something. (This is a
workaround to avoid this redraw bug as much as possible.)
• 'Check links' and 'move files' don't recognize comments.
• 'Check links' and 'move files' only search for strings like HREF="file"
without checking that they are inside a tag.
• 'Move files' only updates files in the home page folder where you move
files and doesn't update files in other home page folders.
• If you use 'save all', windows not at the front are brought to front
when saved. (This is not exactly a bug, it is only unusual behavior.)
• 'Change choice' for EMBED assumes general EMBED.
===============================================================================
= Configuring HTML mode
===============================================================================
There are several functions in HTML mode for maintaining one or more www
sites. To be able to use these functions in the best way you have to tell
Alpha which folder contains the files of a www site. To do this use 'Home
pages' in the menu 'HTML Utilities'. The idea is that each of those
folders, together with their subfolders, should contain all your html files
at a server and be a mirror of your home page at the corresponding server.
In the dialog window you have the following:
Server URLs: a menu with the current home pages for which you have a folder.
Home Page Folder: The folder corresponding to the home page selected in
the menu.
Include Folder: The include folder corresponding to the home page selected
in the menu.
Default file: The default file corresponding to the home page selected in
the menu.
Tip: Use the up and down arrows to navigate in the menu.
New: To define a new home page folder. You are presented with a second
dialog where you should set the following:
Home Page Folder: The folder corresponding to the home page.
Include Folder: A folder where you can put your files to be dynamically
included. This folder is mapped to the same URL as the home page folder.
To define an include folder is optional. Read more about dynamically
included files here.
Server URL: The URL to your home page, for example
http://www.somewhere.net/~myplace/
Default file: The file which is used if a link points to a directory.
This name depends on the configuration of your server, but is usually
index.html.
Change: To change the home page selected in the menu.
Remove: To remove the home page selected in the menu.
Tell Big Brother: If you check this check box, the URL mappings will be
changed in Big Brother's settings, when you click OK. Big Brother is told
which home page folders map to which URLs. Big Brother is a shareware
program for checking links by François Pottier, Francois.Pottier@inria.fr.
You can get Big Brother from his home page, http://pauillac.inria.fr/~fpottier/
===============================================================================
= The HTML Packages
===============================================================================
The HTML elements are put into two packages, which can be loaded
separately.
HTML 3.2 - Contains everything in HTML 3.2 as in the recommendation by World
Wide Web Consortium released 14 January 1997.
Extensions - Contains everything in HTML 3.2 plus extensions to
HTML.
You have probably heard of HTML 3.0. It was a proposal for extending HTML
published in March 1995. HTML 3.0 was never widely deployed. HTML 3.2, on
the other hand, adds widely deployed features such as tables, applets and
text flow around images, while providing backwards compatibility with the
old standard HTML 2.0.
===============================================================================
= How to use tab marks (•)
===============================================================================
When you insert HTML elements via the HTML menu you will see bullet
characters (•), called tab marks, being inserted after the element. These
tab marks are supposed to be a feature. The way to use them is the
following: Suppose you want to insert a header H1. First choose "Header 1"
from the menu (and give the attribute a value if you want). In the
document will now be inserted
<H1></H1>
•
with the insertion point between the H1 tags. Now first type the header
text:
<H1>My header</H1>
•
When you have done so, hit tab and the insertion point will jump to the
tab mark and delete it. You are now ready to continue typing.
If your document has been cluttered with tab marks, which you do not want
to use, you can remove them all with cmd-tab. If you do not want to use
tab marks at all, you can change Alpha's behavior in the settings dialog,
so that the tab marks are not inserted.
================================================================================
= Text wrapping
================================================================================
It is very easy to insert an HTML element in an existing text. For example,
suppose that in some text there is the word "important" which you want in
boldface. First select the word, then choose "Bold" from the menu (or type the
equivalent key binding) and "important" will be wrapped by the HTML tags to
give <B>important</B>. This behavior is the same for all elements which
are containers. Inserting an HTML element never deletes a selection.
===============================================================================
= Coloring
===============================================================================
The text in your HTML files can be colored in two different ways. By
default all HTML tags are colored blue, like
<A HREF="file.html">a link somewhere</A>
In the settings dialog you can tell Alpha to change the coloring and also
color JavaScript keywords. These are then colored magenta. But the
coloring of the HTML tags also changes, like
<INPUT TYPE="BUTTON" VALUE="pi" onClick="piKnapp(this.form)">
While this coloring is primarily intended to be used for files with
JavaScript, it can also be a better choice for files with very little text
and mostly HTML tags. Have in mind though that JavaScript keywords
(if else this...) will be colored even when they are part of ordinary
text.
Bug: When you change the way of coloring, nothing happens until you switch
to another window.
================================================================================
= Funcs menu
================================================================================
If you press the two curly braces in the right hand corner of the window
(the so called 'funcs menu'), this menu will display an item for each
header H1-6 in your file. You can then easily jump to a header by
selecting it in the menu. The menu items are truncated after 30
characters, to prevent them from becoming too long.
================================================================================
= How HTML mode behaves when it asks for attributes to an HTML element.
================================================================================
If an HTML element has attributes, they can be asked about in two different
ways: either in a dialog box with all attributes (the default), or in the
status bar. In the settings dialog you can change which of these two ways
you want to use.
The attributes can be divided into eight categories: URLs, colors, target
windows, predefined choices (for example ALIGN=LEFT|CENTER|RIGHT), numbers,
flags, event handlers, and other. The category 'other' contains attributes
which can take any value plus some which do not fit into any of the other
categories.
Using dialog boxes.
In the settings dialog you can tell Alpha to include JavaScript's event
handlers in the dialog. By default they are not included.
URLs - You can specify the URL in three ways:
1) type the URL in the text box,
2) choose one from the menu with your URL cache,
3) select a file via a file dialog. The file you have
selected will be put in the menu.
It is probably much faster to type the URL than selecting a
file from a file dialog, but the advantage to using the file
dialog is that it will automatically insert a correct absolute
or relative URL depending on which is appropriate. If you use
a BASE tag in the current window it will be noticed.
Files inside home page folders are mapped to a URL
http://as.you.have.defined.it/file.html
and files outside the home page folders are mapped to a URL
file:///path/to/file.html
Alpha first determines the URL of the two files, and then
determines the URL to link between them.
*) If you link within a home page folders you will get a
relative URL.
*) If you link between two different home page folders like
http://here.net/ and http://there.net/ you will get an absolute
URL.
*) If you link between two different home page folders like
http://www.net/~me/ and http://www.net/~you/ (at the same
server), you will get a relative URL.
You can also make links between files which are not in a home
page folder, but linking between files, where one inside a home
page folder and the other one is not, may not always make
sense.
If you type a URL in the text box, it will be used even if you
choose something from the menu.
If you select a GIF or JPEG file for the attribute SRC to IMG
via a file dialog, the attributes WIDTH and HEIGHT are
automatically determined. The algorithm for JPEGs is taken
from the perl script 'wwwimagesize' by Alex Knowles,
alex@ed.ac.uk and Andrew Tong, werdna@ugcs.caltech.edu
Colors - You can specify the color in three ways:
1) type a hexadecimal number #RRBBGG, which defines the color,
in the text box,
2) choose a color from the menu,
3) define a new color. The color so defined will be put in the
menu.
If you type something in the text box, it will be used, even if
you choose a color from the menu.
Window - You can specify the target window in two ways:
1) type the window name in the text box,
2) choose a window name from the menu with your window cache.
If you type something in the text box, it will be used, even if
you choose a window from the menu.
Predefined choices - Select a choice from the menu.
Numbers - Attributes which take an integer value. The numbers will be
checked that they are in the valid range.
Other - Attributes which can take any value. Note that spaces in the
beginning and end of what you type are not removed. (This is
always done otherwise.) This is because sometimes such spaces
are wanted.
Flags - These are attributes which does not take any value. Check the
checkbox to use it.
Event handlers - Attributes which are event handlers for JavaScript.
If an element has very many attributes, the dialog box may have to be
divided into two, or possibly three, pages to fit your screen. Then there
will be a menu in the upper left corner of the dialog box to switch between
the pages. The dialog box is made as large as possible before being split
into two or three pages, so if your screen is large enough this will never
happen.
Alpha will complain if you forget a required attribute, and in most cases
it will complain if you give a value to an attribute which is not valid.
Using the status bar.
By default not all attributes are asked about. Use the menu Use Attributes
to determine which attributes you want to be asked about. There you can
also set a flag 'Ask for more?' for each element. If you answer yes, the
following will happen when you are asked about attributes for this element:
*) You are first asked about the ones you have selected via this menu.
*) Then you get a question "More attributes?"
*) If you answer yes, you will then be asked about the rest of the
attributes.
The idea is that you can put a kind of halfway mark. First you are asked
about the ones you always want to be asked about, and then you are
optionally asked about the rest.
If you told Alpha to include event handlers in the dialog, JavaScript's
event handlers will be asked about for those elements to which you have set
'Ask for more' to yes.
By default, Alpha beeps for each attribute it asks you about. You can turn
off the beeps in the settings dialog.
You can simply type the value you want for an attribute (for colors you can
either type a number #RRBBGG or a color name), but some keys have special
functions to speed up your work.
tab - If you are asked about an attribute with predefined choices, for
example ALIGN=LEFT|CENTER|RIGHT, tab will match what you have typed
against your options, and attempt to complete what you have typed.
Suppose you type C and then tab. The letters ENTER will then
automatically be inserted. The same is true if you are asked for a
URL, a target window or a color. Tab will then match against your URL
cache, the window cache or the color names defined.
double tab - If there are predefined choices or you are asked for a URL,
a color or a target window, double tab will put up a list with
everything that match what you have typed so far. If you, for example,
have forgotten which choices there are, hit double tab without typing
anything to get a list with all possible choices. Once you have chosen
something from the list, Alpha immediately jumps to ask you about the
next attribute.
cmd-v Pastes the clipboard into the status bar. This is useful, for
example, if you want to insert a URL which you have in another file.
ctrl-f - If you want to select a file via a file dialog when asked for a URL,
or define a new color when asked for a color, type ctrl-f in the
status bar. Once you have selected a file or defined a new color,
Alpha immediately jumps to ask you about the next attribute.
If you select a GIF or JPEG file for the attribute SRC to IMG via a
file dialog, the attributes WIDTH and HEIGHT are automatically
determined. Just hit return for the WIDTH and HEIGHT attributes and
the automatically determined values will be used.
ctrl-q Skips the current and subsequent attributes. You do not have to
go through the whole list of attributes.
escape - Deletes everything written.
ctrl-z - Cancel everything.
If there are predefined choices, only the letters which match a choice can
be typed. If you type anything else you just get a beep. Also, when there
are predefined choices, if you have typed a unique subset of one of them
and hit return, the rest will be added. For example, if the choices are
ALIGN=LEFT|CENTER|RIGHT and you type R and then return, you will get
ALIGN=RIGHT. If what you have typed is not unique, the attribute will be
skipped. There are a few cases when two letters are needed to get a unique
choice.
Giving no value at all to an attribute means that you skip it. If you try
to skip a required attribute, it is asked for again.
===============================================================================
= Editing JavaScript
===============================================================================
HTML mode has support for editing and coloring of JavaScript. To use this
you have to change the default configuration in the settings dialog. The
following settings concern JavaScript:
Color JavaScript keywords
If checked, keywords and comments in JavaScript will be colored. The way
the HTML tags are colored is also changed because the old way does not work
well with JavaScript. By default it is not checked, do not color
JavaScript's key words.
Electric left braces
When checked, the left braces, {, will be electric like in C mode. Check
this if you are editing JavaScript. That { is electric means that a
carriage return will automatically be inserted and the next line will be
indented when you type {. By default it is not checked, { is not electric.
Electric right braces
When checked, the right braces, }, will be electric like in C mode. Check
this if you are editing JavaScript. By default it is not checked, } is not
electric.
Include event handlers in attribute dialog
When checked, the event handlers (onFocus onSelect etc.) will appear in
the attribute dialog. By default it is not checked, no event handlers in
the attribute dialog.
Color of JavaScript keywords
The color of keywords in JavaScript. Applies only if you choose to color
JavaScript keywords. The default is magenta.
Color of JavaScript comments
The color of comments in JavaScript. Applies only if you choose to color
JavaScript keywords. The default is red.
Color of strings
The color of everything between quotes. Applies only if you choose to
color JavaScript keywords. The default is green.
If you do not have an American keyboard, you may have to set two key
bindings to be able to use the electric left and right braces. For
example, on my Swedish keyboard { is shift-opt-8 and } is shift-opt-9. To
use the electric braces I have to bind these keys with
bind '8' <so> electricLeft HTML
bind '9' <so> electricRight HTML
This is put in HTML's preference file, via the menu Config -> Current
mode -> Edit Prefs. Change your key bindings similarly if needed.
================================================================================
= Key Bindings
================================================================================
All HTML elements have their own key bindings. You can find them all in
the HTML menu. I have tried to group them as much as possible so that they
are easy to learn.
Other key bindings not found in the menu:
tab Jump to the next tab mark (•)
shift-tab Jump to the previous tab mark (•)
opt-tab Literal tab
cmd-tab Remove all •
shift-ctl-opt-, inserts <
shift-ctl-opt-. inserts >
shift-ctl-opt-7 inserts &
shift-ctl-opt-space inserts
Defining your own key bindings.
Any menu item in HTML mode can be bound to any single keystroke. The way
to bind a function is with a statement such as:
bind 'c' <modifier string> {htmlMenuItem "submenu" "menu item"} HTML
where c is a character, <modifier string> is an optional string containing
one or more of:
c - command modifier
o - option modifier
s - shift modifier
z - control modifier
For example, to bind 'Check Window' to ctrl-opt-W, use the statement
bind 'w' <zo> {htmlMenuItem "Check Links" "Check Window"} HTML
As another example, to bind 'Import Table…' to ctrl-shift-J, use the
statement
bind 'j' <zs> {htmlMenuItem "Tables" "Import Table"} HTML
Such statements can be put in your HTML prefs file. Use Config
-> Current Mode -> Edit Prefs. If a menu item ends with three dots … the
dots must be omitted in the above statement defining the key binding. If a
menu item is renamed or moved in a later version of HTML mode, remember
that you have to change your key bindings. For more information about key
bindings, see the general manual for Alpha.
===============================================================================
= Command-double-click
===============================================================================
Command-double-clicking on an absolute URL sends the URL to your web
browser. This is not limited to HTML mode. It is a general feature of
Alpha.
Command-double-clicking on a relative URL opens a new window with the file
if the file exists and it is a text file. If it does not exist, a new
empty window can be opened with the name of the file. This window is
automatically saved in the right place, and if necessary new folders are
created. Thus, if you are making a new set of pages, you can make links to
the ones you have not written yet and then, by cmd-double-clicking, let
Alpha make empty files which are saved where you want them.
Command-double-clicking on a color attribute brings up a color picker where
you can change the color.
Command-double-clicking on an 'include tag' opens the file.
===============================================================================
= The HTML Menu
===============================================================================
The menu described here is for the Extensions package. In the
HTML 3.2 package some menu items are absent.
The menus are dynamic. Holding down the option key changes some menu
items.
Browsers - To send a document to a browser for viewing, and to select
browsers with which to view documents. The browser
currently marked in this menu is the one your documents
will be sent to when you use 'Send File to Browser'. To
change browser, select the browser's menu item to mark it.
(You can of course add any kind of program to this menu.
Alpha is not so clever that it can tell which ones are
browsers.)
Send File to Browser - Launches your browser and sends the document to it.
You can only have one version of each browser in the menu,
but you can still send files to any version from Alpha.
Let's say you have Netscape 2.0 and 3.0, and that 3.0 is
the one which appears in the menu. Now launch Netscape
2.0. Then if you send a window to the browser Alpha will
send it to Netscape 2.0 although you had 3.0 selected the
menu. If any version of Netscape is running Alpha will
send the window to that one.
This is useful when you want to make sure your document
looks OK in older versions of Netscape or any other browser,
for example to make sure that your megacool JavaScript
written for Netscape 3.0 doesn't produce a bazillion error
alerts in 2.0.
Two comments about Internet Explorer 3.0 (the only version I
have tested):
*) If you use Internet Config and have defined Netscape (for
example) to be the helper for the file protocol, Internet
Explorer will send the file to Netscape. To be able to
send files to Internet Explorer either don't define any
helper for the file protocol in Internet Config or define
it to be Internet Explorer.
*) Internet Explorer opens a new window every time you send
a file to it. This is not an Alpha bug.
Add… - Lets you select a browser and adds it at the bottom of this
menu.
Remove… - To remove a browser from the menu.
Help - Opens this file.
<opt>Manual - Opens the HTML formatted version of this help file in your
browser.
Packages - To choose which package of HTML elements to use. (See
the section abut the HTML packages.) If you change
package, the HTML menu is rebuilt.
HTML Utilities -
Colors… - You can define and name colors to use as background, text
and link color etc. on your www page. Later, when you
insert an element with a color attribute, you can choose
the color for the attribute from a menu. A set of 16 basic
colors is provided by default. These are the 16 color
names defined in HTML 3.2. The predefined colors do not
show up in this dialog because you are not allowed to
change them.
In the popup menu in the dialog window are all color names
you have defined. Below is the hexadecimal number
corresponding to the color selected in the menu.
Tip: Use the up and down arrows to navigate in the menu.
Use
New to define a new color with a color picker.
Change to change a color with a color picker.
Remove to remove the color selected in the menu.
New by number to define a new color by specifying its
hexadecimal number #RRBBGG.
Change number to change a color by changing its hexadecimal
number #RRBBGG.
View to view a color in a color picker. (Clicking OK and
Cancel in this picker have the same effect. No changes are
saved.)
Home Pages… - To define which folders contain the files of different sites,
see the section about how to configure HTML mode.
Footers… - A footer is a file with text which you automatically can
put into the BODY of the document when you create a new
document. To use this function,
*) first create a file with the text which you want to use
on many of your pages -- for example, directory buttons, your
address etc.
*) then define the file to be a footer.
When you later use "New document" you can select this file
from a menu, and its content will be put inside the BODY
element.
These files can of course contain any kind of text but I
call them footers because my basic idea is that they should
contain things you put at the bottom of every page.
In the popup menu in the dialog window are the file names
of the footers you have defined. Below is the full path
corresponding to the file selected in the menu. The
buttons have the following functions.
New - Presents you with a file dialog to pick a file with
a footer. This does not insert any text in your
document. It only defines a file to be a footer.
Remove - Removes the footer selected in the menu. Note: this
does not delete the file. It is just no longer a
footer.
Insert - Inserts the footer selected in the menu in the
document.
Editing - Functions for easier and quicker editing.
Select Container - Selects matching tags which include the current
position or selection. Repeated, it expands the
selection. Like the "Balance" item under the Edit
menu. All tags without a corresponding closing tag
are ignored.
<opt>Select Opening - If the first tag to the left of the current
position is a tag without a corresponding closing
tag, it is selected. Repeated it jumps to the next
one.
Select in Container - Same as 'Select Container' except that only the
content of the container is selected, not the
enclosing tags.
Untag - Removes a tag pair surrounding the current position
or selection. All tags without a corresponding
closing tag are ignored.
<opt>Untag and Select - Same as Untag, but the text inside the container is
selected. Use this if you want to change one
container to another.
Remove Opening - If the first tag to the left of the current
position is a tag without a corresponding closing
tag, it is removed.
Change Container - To change the attributes of the element enclosing
the current position or selection. A dialog box
appears where the current values of all attributes
are shown. Change the ones you want and a new tag
will be inserted in the text.
If the element you want to change contains anything
HTML mode does not understand, a warning message
will first be shown. If you decide to insert a new
tag, everything HTML mode does not understand will
be removed.
If you are using JavaScript, the event handlers
will only be shown in the dialog if you have
checked 'Include event handlers in attribute
dialog' in the settings dialog. Otherwise, the
event handlers are left untouched in the document.
<opt>Change Opening - Same as change container, but for an element with
no closing tag. The tag must be the first one to
the left of the current position to be found.
As you probably have noticed the logic for finding
tags is the same for "Select" "Untag/Remove" and
"Change".
*) Container: the tags enclosing the current
position or selection. All tags without a
corresponding closing tag are ignored.
*) Opening: the first tag to the left must be a tag
without a corresponding closing tag.
It can be a good idea to first select the container
or opening tag, before removing or changing them,
to make sure you select the one you want.
Change Choice - To change an attribute with predefined choices,
without bringing up a dialog window. Put the
insertion point at an attribute with predefined
choices. 'Change Choice' will then change the
attribute to the next choice in the list of
choices. Use 'Change Choice' several times to go
through the list.
Reveal Color - If you move the current position to, or select any
part of, a color attribute in the document and then
choose "Reveal color", the number will be replaced
with its name, and if you choose "Reveal color"
again, the number appears again. This is useful if
you want to know what a cryptic color number stands
for. Do not forget that the browser only
understands the number so do not leave the name in
the document.
Remove Marks - Remove tab marks, (•). If some text is selected,
the tab marks are removed within the selection,
otherwise they are removed in the whole document.
Character Translation - To translate characters to and from their HTML
entities. If some text is selected, the characters
are translated within the selection, otherwise they
are translated in the whole document.
åäö -> HTML - translates characters to HTML entities.
HTML -> åäö - translates HTML entities to characters.
The characters which are translated are all that
you find in the "Small Chars" and "Capital Chars"
menus (except eth, thorn and y´) plus the Spanish ¡
and ¿.
<>& -> HTML - translates the characters <>& to their HTML entities.
HTML -> <>& - translates them back again.
URLs - Everything for managing the URL cache. HTML mode
accumulates a list of the URLs you use in your HREFs, SRCs
etc., and saves the list across invocations of Alpha so it
can help you to insert new URL attributes rapidly.
Clean Up… - After a while the URL cache can get very large and
you may want to remove some URLs you do not need.
You will be presented with a dialog box with a
checkbox for each URL in your cache. Uncheck the
ones you want to remove. Click "Uncheck all" to,
guess what, uncheck all checkboxes. If there are
more URLs in your cache than fit the window, there
is a button "More" to take you to the next ones, and
a button "Back" to go back.
Clear - Removes all URLs from your cache.
Import… - Scans a file and imports all URLs found to the URL
cache.
Export… - Exports all URLs in the cache to a file for later use.
If you create several files with URLs and want to
move the URLs between them, simply open the files
and cut and paste.
Add Folder… - Adds the names of all files in a folder to the URL
cache. You can optionally add a path before the
file name. For example, if you have a folder 'pics'
with images, you might want to add
'pics/file.gif' to the cache rather than only
'file.gif'.
Add Selection - Adds the current selection to the URL cache.
Add Clipboard - Adds the clipboard to the URL cache.
Windows - Everything for managing the window cache. HTML mode
accumulates a list of the window names you use as target
windows and saves the list across invocations of Alpha
so it can help you to insert new window attributes rapidly.
Clean Up… - Works in the same way as Clean up for the URL cache.
Clear - Removes all windows from your cache.
Check Links - Functions to scan files and check that all links, HREFs,
SRCs etc. point to files which exist. The files which are
scanned are the HTML text files (the ones which have any
of the suffixes as specified by the suffix mapping).
For this to be useful the files in your home page folders
must be mirrors of the files at your servers.
If you use this function as intended you never have to
worry about dead links between your files anymore.
It works as follows: In every file scanned Alpha looks for
all HREFs, SRCs, etc in the file. If you use the BASE
element it will be noticed and used to determine to which URL
a link is pointing.
Links to remote servers, which you don't have a home page
folder for, are ignored. Also, if you have a home page
folder for http://www.net/~myplace/, links like
http://www.net/file.html are ignored, as they are outside
your home page. For all other links, Alpha checks if the
file exist.
If any invalid links are found, a window is opened where
the lines look as follows:
file.html ; Line 8: HREF="otherfile.html"
file2.html ; Line 23: (anchor missing) HREF="file.html#anchor"
folder:file3.html ; Line 17: (BASE used) SRC="pic/coolpic.gif"
In the first column is the name of the file with the link,
including the path relative to the home page folder. In
the second column is the line number where the invalid link
is, and in the third column is the link itself.
(anchor missing) means that the file exists but that the anchor
is missing in the file.
(BASE used) means that the file contains a BASE element.
Use the up and down arrows to select a line in this window,
and carriage return to open the file and select the line
with the invalid link.
You can optionally check that the case of the links match
the case of the file names on your disk. This can be
useful as Mac file names are not case sensitive, while for
example unix file names are. Therefore a link can work on
your Mac but not work on a unix machine. In the settings
dialog you can tell Alpha to make a case sensitive link
checking. This is slower and therefore not done by
default.
Limitations:
• If a link is within a comment, <!-- -->, it is
still checked.
• Alpha only searches for strings like
HREF="file" without checking that they are inside a tag.
This means that Alpha could find links, which actually are
not links.
Check Window - Checks links in current window.
Check Home Page - Check links in all html files in a home page
folder and its sub folders.
Check Folder - To check links in all files in one folder. You can
optionally check the subfolders.
Check File - To check links in a single file.
Use Big Brother - Marks this menu item to indicate that link checks
will be done with Big Brother instead of Alpha. If
this menu item is checked, files and folders will
be sent to Big Brother when you check links.
Some settings are temporarily changed in Big
Brother, when you send a file or folder to it. These are
*) The URL mapping of your home page folders.
*) If subfolders should be searched or not.
*) Optionally you can tell Big Brother if it should
ignore remote or local links. This is done in the
settings dialog. By default Big Brother's settings
for this are used.
Big Brother is a shareware program by François
Pottier, Francois.Pottier@inria.fr. You can get
Big Brother from his home page,
http://pauillac.inria.fr/~fpottier/
The big advantage with Big Brother is that it can
check all your remote links. It checks local links
on your hard disk with about the same speed as
Alpha, but Big Brother can run in the background
while you do other things.
Other differences:
*) Big Brother understands all HTML 3.2 links, but
not things like <FRAME SRC="url">
*) Alpha only searches for strings like HREF="url"
and don't check that they are inside a tag, like <A
HREF="url">. Big Brother does that.
*) Big Brother recognizes comments while Alpha
doesn't.
*) Big Brother doesn't check anchors.
*) Big Brother can't make case sensitive link checking.
This comparison was done with Big Brother 1.1,
and may of course not apply to later versions.
Includes - Function to dynamically include files in your document.
Let's say you have a document where one part contains
information which is updated frequently while the rest is
almost never changed. You can let the part which changes
often be in another file and insert 'include tags' in the
original document. As another example, let's say some
information is used in more than one document, perhaps if
you make two versions of your home page, one with frames and
one without. You can then have this information in a
separate file and and insert 'include tags' in the other
ones. In this way you only have to make a change at one
place. You can later quickly update your files and replace
the text between the 'include tags'.
When you define a home page folder, you can also define an
include folder for it, where you can put all the 'include
files'. Although you can put these files anywhere you
like, the include folder has certain advantages when the
include files contain links. Alpha maps the include folder
to the same URL as the home page folder, and therefore
treats the files in the include folder as if they were in
the home page folder. To see what I mean, consider the
following example:
*) Suppose you have a home page folder for http://www.net/
and have defined a corresponding include folder.
*) Make a subfolder 'testing' both in the home page folder
and in the include folder.
*) Open a new file 'include.html' inside the subfolder
'testing' in the include folder.
*) Make a couple of links from include.html. Use the file
dialog and select files in the home page folder. You will
see that the relative URLs will be constructed as if
include.html was in the home page folder.
*) Now open a new file hi.html inside the subfolder
'testing' in the home page folder. Use 'Insert include
tags' and select the file include.html in the include
folder. The links in hi.html will now be correct and you
can send it to your browser and surf around.
The idea with all this is that you don't have to clutter
your home page folder with files which are not an actual
part of your home page, and still take advantage of Alpha's
functions to make links.
For this to work the include file must be in a subfolder
with the same name as the file(s) where it will be
included. You have to make sure you put the files in the
right places yourself. Alpha won't do that for you.
A few of other things:
*) If you check links in include.html Alpha will look for
files in the home page folder.
*) If you cmd-double-click a link in include.html, Alpha
will open the file in your home page folder.
Insert Include Tags… - Asks you for a file to include, and inserts two
tags inside comments and the content of the file,
<!-- #INCLUDE FILE="path to file" -->
content of file
<!-- /#INCLUDE -->
If you later change the content of the included
file, you can quickly update the current document
with the functions below.
When you use character translation, the opening
include tag is not translated to avoid making
the path incorrect.
If the path contains any of the characters <">#,
they are translated like
# -> #;
< -> #lt;
> -> #gt;
" -> #qt;
in order to make the tag unambiguous.
Update Window - Replaces the text between all pairs of 'include
tags' with the content of the file specified in the
opening tags.
Update Home Page - Replaces the text between all pairs of 'include
tags' in all HTML files in a home page folder with the
content of the file specified in the opening tags.
Update Folder - The same function for a folder.
Update File - The same function for a single file.
If you write anything between the 'include tags',
it is only a temporary change. The next time you
update your document everything between the tags is
replaced.
If you remove 'include tags' in a document, make
sure you remove both the opening tag and the
corresponding closing tag.
If a file contains 'last modified date' tags, the date
is changed if the file has been modified.
Recursive including of files is not supported, which
means that if a file which is included also
contains 'include tags' they are ignored, and the
tags, but not the text between them, are removed
before the text is inserted.
Extend - To add new HTML elements, or new attributes to existing
elements, to HTML mode. HTML is continuously evolving and
many browsers have introduced their own extensions. Here
you can add what is missing. New elements will be put in a
new submenu 'Custom' of the HTML menu.
You can only add new elements to the extensions package.
HTML 3.2 is complete as it is.
IMPORTANT! If you have previously defined new HTML elements
in the preferences file HTMLPrefs.tcl (could be done in
HTML mode 1.1.1 and earlier), make sure you remove all of
them and restart Alpha before using this function.
Otherwise there is a risk of conflicts between the two
ways of adding elements. If you have element definitions
in your prefs file and you already have loaded HTML mode,
you may have seen a warning message that the way to add new
elements has changed. This warning message is shown if you
call the function htmlNewElemVar or define the variable
htmlCustomMenuList. Remove all such things from the prefs
file and restart Alpha to avoid this warning.
New Element - To add a new HTML element.
The elements are divided into three categories.
*) Normal. All which are not of one of the other
two categories.
*) Input element. A <INPUT TYPE="xxx"> element for
forms.
*) Plug-in. A plug-in using <EMBED>.
In the first dialog you specify the following.
*) The name of the element.
For 'normal' elements simply give the name, for
example to define <IMG> you would use 'IMG'.
For 'input elements' give the type, for example
to define <INPUT TYPE=CHECKBOX> use 'CHECKBOX'.
For 'plug-ins', use any descriptive name you
like.
*) If the element has a closing tag </TAG> or
not. This only applies to 'normal' ones as
neither <INPUT> nor <EMBED> has a closing tag.
*) A key binding for the element. Type one
character in the text box, and select which of the
modifiers shift, control, option and command you
want. It is a bad idea to choose a key binding
which conflicts with another one, but if it turns
out that you have made a bad choice you can change
it later. If you do not want any key binding,
leave the text box blank.
Next you are asked to specify all the attributes to
the element. (I would say that it is a good idea to
write down the complete definition on a piece of
paper before you start.)
In the first dialog for each attribute you specify:
*) Its name.
*) If it is a required attribute or not.
*) Its type. Make sure you specify the correct
type for each attribute. For some types additional
information must be given. This is explained in
detail below.
The attributes you define will be displayed in the
dialog window as you go along.
Then click
*) OK when you have given the above information for the
current attribute.
*) 'No more attributes' *after* you have clicked OK
for the last attribute.
*) 'Remove last' to remove the last attribute you just
defined. You can remove them all one after another
to correct a mistake somewhere.
The different types are
*) 'Other'. Attributes that can take any value or
do not fit into any of the other seven
categories. No additional information is needed.
*) 'Number'. Attributes which take an integer
value. For these, a second dialog box is shown,
where you must specify the range of values
accepted. A minimum value must be given, but if
there is no maximum value, leave the text box for
this blank. You should also specify if the value
may be given in percent or not.
*) 'Choices'. Attributes which can only take
certain predefined choices, such as
ALIGN=LEFT|CENTER|RIGHT. For these attributes you
must specify all valid choices in a second dialog
box. The choices you define will be displayed in the
dialog window as you go along.
Click
*) 'OK' for each choice
*) 'No more choices' *after* you have clicked OK for the
last one.
*) 'Remove last' to remove the last choice you just
defined. You can remove them all one after another
to correct a mistake somewhere.
*) 'Flag'. Attributes which are flags and don't
take any value, like ISMAP for <IMG> or NOHREF for
<AREA>. These attributes will be checkboxes in the
attribute dialog. No additional information is
needed.
*) 'URL'. Attributes which take a URL as value, like
HREF, SRC, etc. No additional information is needed.
*) 'Color'. Attributes which take a color as
value. No additional information is needed.
*) 'Window'. Attributes which take a target window
as value, like the attribute TARGET. No additional
information is needed.
*) 'Event handler'. Attributes which are event
handlers for JavaScript. No additional information
is needed.
Once you have specified all attributes you will be
presented with a final dialog box, where you are
asked which layout you want in the html documents.
(This layout only determines how the tags are
inserted in the text document, and affects, of
course, not how the text is displayed by the
browser.)
For elements without a closing tag you can specify
if you always want a carriage return inserted
before and/or after the tag.
For elements with a closing tag, you can choose
between four different layouts, whether you want
the tags to be on lines of their own and if you
want blank lines before and after them.
The new element is now saved and after that, if
you use the status bar to input attributes, you
will be asked to select which optional attributes
you want to be asked about (as described here).
New Attributes - To add new attributes to an existing HTML element.
You are first presented with a list from which you
choose an element to add attributes to. In this
list 'LI IN UL' and 'LI IN OL' are the LI element for
UL and OL lists respectively. BUTTON, CHECKBOX,
FILE, HIDDEN, IMAGE, PASSWORD, RADIO, RESET, SUBMIT
and TEXT are the INPUT element with different
TYPEs. LIVEAUDIO, LIVEVIDEO, QUICKTIME MOVIE,
QUICKTIME VR and REALAUDIO are different plug-ins.
All the rest are the usual names of the elements.
Then you specify the attributes in the same way as
you specify the attributes to a new element as
described above.
New Choices - To add new choices to an attribute with predefined
choices. You are first presented with a list from
which you choose the element with the attribute to
add to. Second, you are presented with a list from
which you select the attribute. Then you specify
new choices in the same way as described above.
Change Key Binding - To change a key binding for a custom element.
To remove the key binding, leave the text box
blank. Note that you can only change the key
bindings for the elements you have added yourself.
Change Type and Layout - To change the layout of a custom element,
to change whether it has a closing tag or not, and
to change its type (normal, input element or
plugin).
Remove Attributes - To remove one or more of the attributes you have
added to some element, or to remove choices you
have added to an attribute. You are first
presented with a list of all elements you have
added attributes to. Select the element you want
and you are then presented with a list with all
attributes you have added to this element, where you
can select the ones you want to remove. If you
have only added new choices to an attribute, only
these choices are removed, not the attribute
itself.
There is no function to directly change an
attribute. (This is something I hopefully will get
around to add someday.) To change an attribute you
have to first remove it and then add a new one
again.
Remove Additions - To remove an element you have added or to remove
additions you have made to a predefined element.
With this function you remove all additions you
have made to an element.
Move Files… - To move files between different folders, automatically
updating all links which points to any of these files in
every file in a home page folder or include folder, as well as
updating all links in the moved files.
*) First you are asked to select the folder which contains
the files you want to move.
*) Then you are asked to select the files you want to move
from this folder.
*) And then you are asked to select the destination folder.
Alpha then moves the files and then asks you if you want to
update all links (this is the whole point of this function,
so a 'yes' should be appropriate). Depending on if you
have moved files in a home page folder or an include
folder, the following will happen.
If you have moved files in a home page folder which does not
have a corresponding include folder
*) the links in all HTML files (as determined by the suffix
mapping) pointing to the moved files, will be updated.
*) all links in the moved files are updated.
If you have moved files in a home page folder which has a
corresponding include folder
*) the links in all HTML files in the home page folder
pointing to the moved files, will be updated.
*) all links in the moved files are updated.
*) the links in all HTML files in the include folder pointing
to the moved files, will be updated.
(In this case you can optionally choose to only update the
home page folder or include folder, but normally you should
update both.)
If you have moved files in an include folder
*) all links in the moved files are updated
*) all include tags in the HTML files in the home page
folder pointing to the moved files are updated.
Updating links may take a little while if you have very
many files but should in most cases be a lot faster than
to make the changes manually.
Limitations:
• Links within comments , <!-- -->, are also updated (which
is a bug or a feature, depending on how you see it).
• Alpha only searches for strings like HREF="file" without
checking that they are inside a tag. This means that Alpha
could find links, which actually are not links.
• You can only move files between subfolders in one home
page folder, not between the different home page folders.
• Only files in the home page folder where you move
files are updated, not the files in any other home page
folder.
Last Modified… - Adds tags to the document which makes it possible to
automatically add the date and time when the document is
saved. Two tags inside HTML comments are inserted:
<!-- #LASTMODIFIED TEXT="some text" FORM="date format" -->
some text and date
<!-- /#LASTMODIFIED -->
Whenever the document is saved the date is changed. Don't
write anything between the comment tags. It will be removed
when the document is saved.
Character translation is done automatically of the text and date.
In the dialog window you can specify:
*) the text before the date. (Default: Last modified)
*) the date format, long, abbreviated or short. On an American
system these are:
Saturday, October 19, 1996 9:10 PM
Sat, Oct 19, 1996 9:10 PM
10/19/96 9:10 PM
*) if the weekday should be included in the date. (Does not
apply to the short format.)
*) if the time should be included in the date.
If you want to change how the date is displayed, just use
'Last modified' again and the tags will be replaced. It is
not possible to have more than one pair of tags in a
document.
Use Attributes - If you choose to input attributes from the status bar, you
can select which ones you want to be asked about. If you
choose to be asked about attributes in a dialog box you
will always be asked about all attributes.
This menu is disabled if you choose to input attributes in
a dialog box with all attributes (the default).
For inputting attributes in the status bar, HTML mode is by
default set to ask about the ones which I think are the most
popular. If you choose to use the status bar
to input attributes I recommend that you go through the
list and choose the ones you want. In this list 'LI IN UL'
and 'LI IN OL' are the LI element for UL and OL lists
respectively. BUTTON, CHECKBOX, FILE, HIDDEN, IMAGE,
PASSWORD, RADIO, RESET, SUBMIT and TEXT are the INPUT
element with different TYPEs. LIVEAUDIO, LIVEVIDEO,
QUICKTIME MOVIE, QUICKTIME VR and REALAUDIO are different
plug-ins. All the rest are the usual names of the
elements.
There is also a question "Ask for more?" If you answer yes,
the following will happen when you are asked about
attributes for this element:
*) You are first asked about the ones you have selected via
this menu.
*) Then you get a question "More attributes?"
*) If you answer yes, you will then be asked about the rest
of the attributes.
The idea is that you can put a kind of halfway mark.
First you are asked about the ones you always want to be
asked about, and then you are optionally asked about the
rest.
Note: The settings only affect the current HTML package.
You have to set everything for both packages even if an
element is in both of them. This is because some elements
have different attributes in the different packages.
New Document - To insert the elements HTML, HEAD, TITLE, BODY in a new
HTML document. If you have a text file which you want to
make into an HTML file, this function lets you put the text
into the document's BODY element. Before choosing "New
document", open a new empty window or a text file which you
want to make into an HTML document.
First a dialog box appears where you can:
*) give the document a title,
*) choose elements you want, which can be in the HEAD.
(These elements can of course be inserted later.)
*) choose a footer which is inserted in the end of the BODY
element. You define a file to be a footer via the menu item
Footers.
When you are finished with the first dialog box
you are then asked about attributes for each element you
have chosen to put in the HEAD, and finally you are asked
about attributes for the BODY element.
The elements <HTML>, <HEAD>, <TITLE>, your chosen ones, and
<BODY> are now inserted in the text. If there was text in
the document, it is put in the BODY before the text in the
footer.
Now comes the part of the menu with all HTML elements. Some of the menu
items for the elements are dynamic. Hold down the option key and you see
that some menu items change. The new ones which appear insert the same
element as the other ones but with all attributes automatically skipped.
("No attr" in the menu stands for "no attributes"). The elements which
this concerns are <H1>-<H6>, <P>, <DIV>, <BR>, <HR>, <UL>, <OL>, <TR>, <TH>
and <TD>. This can be very useful if you for example are making a table
and only for a few cells want to set some attributes.
Headers - Insert section headers, from H1 to H6.
Header n - <Hn>.
<opt> Hn no attr - <Hn> without attributes.
Blocks and Dividers - These are various text-blocks and elements to control
line breaks.
Insert Line Breaks - Insert a <BR> tag at the end of each line in a
selection. To use this, first select the text where you
want the <BR> tags.
<opt>Remove Line Breaks - Removes all <BR> tags in a selection (not only
the ones at end of lines). To use this, first select the
text where you want to remove the <BR> tags.
Insert Paragraphs - Insert <P> elements at each empty line in a selection,
and one just before the selection. To use this, first
select the text where you want the <P> elements.
Paragraph - <P>
<opt>P no attr - <P> without attributes.
Division - <DIV>
<opt>DIV no attr - <DIV> without attributes.
Block Quote - <BLOCKQUOTE>
Address - <ADDRESS>
Center - <CENTER>
Preformatted - <PRE>
Multi Column - <MULTICOL>
Spacing - <SPACER>
Line Break - <BR>
<opt>BR no attr - <BR> without attributes.
Horizontal Rule - <HR>
<opt>HR no attr - <HR> without attributes.
No Line Break - <NOBR>
Word Break - <WBR>
Styles - Elements for different text styles. The ones above the
line in the middle of the menu are physical styles, while
the other ones are logical styles.
Font - <FONT>
Basefont - <BASEFONT>
Bold - <B>
Italic - <I>
Strike out - <STRIKE>
Underlined - <U>
Superscript - <SUP>
Subscript - <SUB>
Bigger - <BIG>
Smaller - <SMALL>
Typewriter - <TT>
Blinking - <BLINK>
Emphasis - <EM>
Strong - <STRONG>
Definition - <DFN>
Code - <CODE>
Variable - <VAR>
Citation - <CITE>
Keyboard - <KBD>
Sample - <SAMP>
Links - Hypertext links to and from other points, plus images.
Link or Anchor - <A>
Image - <IMG>
Plug-ins - Different plug-ins all using <EMBED>
General - General <EMBED> tag.
LiveAudio etc. - Plug-ins with more attributes to <EMBED>.
No Embed - <NOEMBED>
Lists - All kinds of lists.
Make List - Makes a list of the text in a selection. If you,
for example, have a list
* item one
* item two
* item two
and a half
* item three
you can make an HTML list of them. First select the
lines with the items, before you choose "Make list"
from the menu. You are then presented with a dialog
where you can specify
*) a string with which all list items must begin, in
this case *. You cannot transform a list where the
items begins with 1), 2) etc. All items must begin
with the same string.
*) Which kind of list you want. Choose 'None' if you
don't want the list tags to be inserted, for example if
you are inserting new items in an existing list.
The result in this case will be
<UL>
<LI>item one
<LI>item two
<LI>item two
and a half
<LI>item three
</UL>
Bulleted - <UL> list.
<opt>UL no attr - <UL> without attributes.
New Bulleted Item - <LI> with attributes corresponding to an <UL> list.
Ordered - <OL> list.
<opt>OL no attr - <OL> without attributes.
New Ordered Item - <LI> with attributes corresponding to an <OL> list.
Directory - <DIR> list.
Menu - <MENU> list.
New List Item - <LI> without attributes.
Discursive - <DL> list.
New Discursive Entry - <DT> and <DD>
When you make a list you are first asked how many items you want and,
in some cases, if you want to be asked about attributes for each list
item. You are then asked about attributes for the list element and
finally, if you have said so, about attributes for each list item.
Forms - The elements for building forms.
Form - <FORM>
Text - <INPUT TYPE=TEXT>
Checkbox - <INPUT TYPE=CHECKBOX>
Button - <INPUT TYPE=BUTTON>
Radio - <INPUT TYPE=RADIO>
Submit - <INPUT TYPE=SUBMIT>
Reset - <INPUT TYPE=RESET>
Password - <INPUT TYPE=PASSWORD>
Hidden - <INPUT TYPE=HIDDEN>
Image - <INPUT TYPE=IMAGE>
File Upload - <INPUT TYPE=FILE>
Select - <SELECT>
Option - <OPTION>
Textarea - <TEXTAREA>
Tables - The elements for building tables.
Table Template… - A function to easily build a table if it does not have
too complicated a structure. You are presented with a
dialog box where you can specify:
*) the number of rows and columns you
want.
*) whether you want table headers (TH) in the first row
and/or the first column. The rest will be table cells
(TD).
*) whether or not you want TABLE tags. Skip the table tags
if you want to insert new rows in an existing table.
*) attributes for TABLE.
*) attributes for TR. These attributes will be the same
for every row.
You cannot use this function to build more complicated
tables which requires attributes such as ROWSPAN and
COLSPAN.
Tabs to Rows - Takes a tab-delimited table and make HTML table rows.
To use this, first select the text to make table
rows of before you choose "Tabs to Rows" from the menu.
Example: If you have the lines
a b c
d e f
in your document, "Tabs to Rows" will transform them into
<TABLE>
<TR>
<TD>a</TD><TD>b</TD><TD>c</TD>
</TR>
<TR>
<TD>d</TD><TD>e</TD><TD>f</TD>
</TR>
</TABLE>
Do not put more than one tab between each table cell.
Alpha makes one table cell for each tab in each row.
When you use this function you are presented with a
dialog box where you can specify:
*) whether you want table headers (TH) in the first row
and/or the first column. The rest will be table cells
(TD).
*) whether or not you want TABLE tags. Skip the table tags
if you want to insert new rows in an existing table.
*) attributes for TABLE.
*) attributes for TR. These attributes will be the same
for every row.
<opt>Rows to Tabs - Converts table rows in a selection to a tab-delimited
format. (This is "Tabs to Rows" backwards.)
To use this, first select the table rows you want to
convert. This function will remove the elements TR, TH
and TD, and put one tab between each table cell.
Everything in each table row will be put on one line.
If the table contains cells of varying length you may
have to change the tab size for the table to look
pretty. This function does not remove the surrounding
TABLE tags.
Import Table… - Function to import a tab delimited table from a file.
This works just like 'Tabs to Rows' except that the
table is read from a file rather than being selected in
the document.
Table - <TABLE>
Row - <TR>
<opt>TR no attr - <TR> without attributes.
Header - <TH>
<opt>TH no attr - <TH> without attributes.
Cell - <TD>
<opt>TD no attr - <TD> without attributes.
Caption - <CAPTION>
Frames - The elements for building frames.
New Doc. with Frames - The same as New document, with the difference
that BODY is replaced by FRAMESET.
Frameset - <FRAMESET>
Frame - <FRAME>
No Frames - <NOFRAMES>
Image Maps - The elements for client side image maps.
Convert NCSA Map… - Lets you select an image map file for the NCSA server,
converts it to a client side image map definition, and
inserts it at the current position in the document.
Convert CERN Map… - The same function for image map files for the CERN
server.
If you know the syntax for image map files for any
other server, please tell me and I'll add it.
Map - <MAP>
Area - <AREA>
Java - The elements for Java and JavaScript.
Applet - <APPLET>
Parameter - <PARAM>
Script - <SCRIPT>
No Script - <NOSCRIPT>
Other - Things which do not fit elsewhere.
Comment - Inserts a HTML comment <!-- -->, or a JavaScript comment
/* */ if the insertion point is inside a SCRIPT container.
Base - <BASE>
Isindex - <ISINDEX>
Link - <LINK>
Meta - <META>
Comment Line - Inserts a commented line with = signs. Use it if you
want to divide the document into different parts. The
key binding for this is ctrl-C-L.
Character Entities - The entities for characters, for example ü is ü.
All possible entities are divided into three submenus.
Picking a character from these menus is only useful if you
only want a single character. If you write in a language
which use a lot of these characters, type them in the
document as usual and then use the character translation.
Add - Letters can be added to the short list at the top.
Choose the ones you want from a pick list.
Default - Sets the short list at the top back to the default
setting: less than, greater than, ampersand.
Clear - Removes all letters from the short list.
Small Chars - Inserts the character entity for a letter, for example,
á inserts á.
Capital Chars - Inserts the character entity for a capital letter.
Other Chars - Character entities for other characters.
The reason for the accent being beside some letters is that the font
used in the menus, Chicago, does not have these accented letters.
===============================================================================
= Settings
===============================================================================
HTML mode is highly customizable. You can modify its behavior in several
ways.
Use Config -> Current mode -> Flags... to change the settings.
General
Bring browser to front when sending a window to it
If checked, when you send a file to the browser, the browser will be
brought to the foreground. If you have lots of screen space and are just
validating, uncheck this flag to leave the browser in the background and
Alpha in the foreground. By default the browser is brought to the foreground.
Save window without asking when sending it to the browser
If checked, when you send a file to the browser, the window is saved
automatically without asking you. By default you are asked if you want to
save the window.
Set tags in lower case
If not checked, elements will be like <P>; if checked, like <p>. By
default upper case is used.
Use tab marks (•)
If checked, will insert the • characters. By default the • characters
are inserted.
<P> has a closing tag </P>
If checked, the <P> element has a corresponding closing tag. If not
checked it does not. By default it has a closing tag.
<LI>, <DT> and <DD> have closing tags
If checked, <LI>, <DT> and <DD> have corresponding closing tags. If not
checked the optional closing tags are skipped. By default they do not
have closing tags.
Give attributes in dialog windows, not in the status bar
If checked, element attributes will be asked about in a dialog box with
all attributes, otherwise they will be asked about in the status bar. By
default dialog boxes are used.
Beep for each attribute (applies only if you use the status bar)
If checked, and you input element attributes from the status bar, Alpha
will beep when asking for element attribute information there. By default
Alpha will beep. This applies only if you use the status bar.
Color of HTML tags
The color of the HTML tags. The default is blue.
JavaScript
Color JavaScript keywords
If checked, keywords and comments in JavaScript will be colored. The way
the HTML tags are colored is also changed because the old way does not work
well with JavaScript. By default JavaScript keywords are not colored.
Electric left braces
When checked, the left braces, {, will be electric like in C mode. Check
this if you are editing JavaScript. By default { is not electric.
Electric right braces
When checked, the right braces, }, will be electric like in C mode. Check
this if you are editing JavaScript. That { is electric means that a
carriage return will automatically be inserted and the next line will be
indented when you type {. By default } is not electric.
Include event handlers in attribute dialog
When checked, the event handlers (onFocus onSelect etc.) will appear in
the attribute dialog. By default event handlers will not appear in
the attribute dialog.
Color of JavaScript keywords
The color of keywords in JavaScript. Applies only if you choose to color
JavaScript keywords. The default is magenta.
Color of JavaScript comments
The color of comments in JavaScript. Applies only if you choose to color
JavaScript keywords. The default is red.
Color of strings
The color of everything between quotes. Applies only if you choose to
color JavaScript keywords. The default is green.
Checking links
Check anchors
When checked, 'Check links' will check that there is an anchor
<A NAME="anchor"> in file.html if a link <A HREF="file.html#anchor"> points
to it. By default anchors are checked.
Case sensitive checking (slower)
When checked, 'Check Links' will check that the case in the links match the
case in the file and folder names. This can be useful as Mac file names
are not case sensitive, while for example unix file names are. Case
sensitive checking is slower, and therefore not done by default. If you
send the files to Big Brother, case sensitive checking will not be done, as
Big Brother can't do that.
Bring Big Brother to front when checking links
If you use Big Brother to check links, this will determine if Big Brother
stays in the background or not, when you send files to it. By default Big
Brother is brought to the front.
Use Big Brother's link check options
When not checked, the settings for the two links checking options below will
used instead of the correspoding options in Big Brother. By default
Big Brother's settings are used.
Ignore remote links
The same as the corresponding option in Big Brother.
Ignore local links
The same as the corresponding option in Big Brother.
Word Wrapping
Line width
Determines at which position lines are wrapped. This is the HTML mode
specific version of the variable fillColumn in the global settings dialog.
wordBreak - These two control which characters build up words,
wordBreakPreface -
wrapBreak - and these ones control word wrapping.
wrapBreakPreface -
Read about them in the general manual if you want to
change them (should usually not be needed).
Internal variable which you may change
HTMLwords - keywords which you want to be highlighted when editing
HTML in Alpha. They are colored with the same color as
the HTML elements. If you want the words "cool" and
"nifty" to be highlighted, add the following to your
preferences file:
lappend HTMLwords cool nifty
htmlColorizing
The first line defines the words and the second one
tells Alpha to color them. By default there are no
keywords.
===============================================================================
= HTML Tutorials, References and Validation
===============================================================================
A Beginner's Guide To HTML,
http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html
The Web Design Group
http://www.htmlhelp.com/
Introducing HTML 3.2
http://www.w3.org/pub/WWW/MarkUp/Wilbur/
Introduction to HTML and URLs
http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/intro.html
Guide to HTML Commands
http://www.woodhill.co.uk/html/html.htm
Creating Net Sites
http://home.netscape.com/assist/net_sites/
The Bare Bones Guide to HTML
http://werbach.com/barebones/
JavaScript
http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/
HTML Validation
http://www.webtechs.com/html-val-svc/